/**
 * Sumpu Inc.
 * Copyright (c) 2011-2012 All Rights Reserved. 
 */
package cn.sumpu.app.guoguojie.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * @author nick
 * @version $Id: DoingProductFrom.java, v 0.1 2012-8-14 上午11:11:01 nick Exp $
 */
public enum DoingProductFrom {
    TAOBAO("淘宝", "淘宝"), JINGDONG("京东", "京东"), FANKE("凡客", "凡客"), PAIPAI("拍拍", "拍拍"), DANGDANG("当当", "当当");

    private String value;
    private String label;

    private DoingProductFrom(String value, String label) {
        this.value = value;
        this.label = label;
    }

    private static Map<String, String> cache;

    static {
        cache = new HashMap<String, String>();
        cache.put(TAOBAO.getValue(), TAOBAO.getLabel());
        cache.put(JINGDONG.getValue(), JINGDONG.getLabel());
        cache.put(FANKE.getValue(), FANKE.getLabel());
        cache.put(PAIPAI.getValue(), PAIPAI.getLabel());
        cache.put(DANGDANG.getValue(), DANGDANG.getLabel());
    }

    public String getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    public static String getLabelByValue(String value) {
        return cache.get(value);
    }
}
